package com.example.dessert.service;

import com.example.dessert.entity.Orders;

import java.util.List;

public interface OrderService {

    //商品立即购买
    Long buyByProduct(Long userId,String productName,String specName,Integer price,Integer number,String contact,String mobile,String province,String city,String county,String address);

    //根据ID查询订单信息
    Orders queryOrderById(Long id);

    //更新订单信息
    int saveOrder(Orders orders);


    //分页查询订单列表
    List<Orders> queryOrderPageByUser(int startPage, int pageSize, Long userId, int status);

    //订单总数
    Long queryOrderCountByUser(Long userId, int status);

    //根据ID和用户id查询订单信息
    Orders queryOrderByIdAndUserId(Long userId,Long ids);

    //购物车批量购买
    Long batchBuyByProduct(Long userId,String ids,String contact,String mobile,String province,String city,String county,String address);
}
